package com.wl.zlmanage.task;

import com.wl.zlmanage.controller.MatchController;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by ThinkPad on 2018/9/8.
 */
@Component
public class CountProfitTask {

    private Logger logger = LoggerFactory.getLogger(CountProfitTask.class);

    @Autowired
    MatchController matchController;

    @Scheduled(cron = "0 1 0 * * ?")
    public void countProfit() {
        logger.info("start count profit !!!");
        Map<String, Map<String, Double>> reMap = matchController.getSignMatchList();
        logger.info("本次业绩计算结果：" + reMap.toString());
        logger.info("end count profit !!!");
    }

}
